package chain;

import filter.ConversationManager;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.chain.impl.ContextBase;

/**
 *
 * @author dakhoa
 * @version 1.0
 */
public class EDATContext extends ContextBase {

    private String requestAction;
    private boolean isAjaxRequest;
    private HttpServletRequest request;
    private HttpServletResponse response;
    private IDialogEventHandler dialogEventHandler;

    public EDATContext() {
        
    }

    public boolean isIsAjaxRequest() {
        return isAjaxRequest;
    }

    public void setIsAjaxRequest(boolean isAjaxRequest) {
        this.isAjaxRequest = isAjaxRequest;
    }

    public IDialogEventHandler getDialogEventHandler() {
        return dialogEventHandler;
    }

    public void setDialogEventHandler(IDialogEventHandler dialogEventHandler) {
        this.dialogEventHandler = dialogEventHandler;
    }

    public String getRequestAction() {
        return requestAction;
    }

    public void setRequestAction(String requestAction) {
        this.requestAction = requestAction;
    }

    public Map<String, Object> getFlScope() {
        return ConversationManager.getInstance().getFlowScope();
    }

    public HttpServletRequest getRequest() {
        return request;
    }

    public void setRequest(HttpServletRequest request) {
        this.request = request;
    }

    public HttpServletResponse getResponse() {
        return response;
    }

    public void setResponse(HttpServletResponse response) {
        this.response = response;
    }
}
